/*******************************************************************************
 * Copyright (c) 2020, 2025 Lablicate GmbH.
 *
 * This program and the accompanying materials are made
 * available under the terms of the Eclipse Public License 2.0
 * which is available at https://www.eclipse.org/legal/epl-2.0/
 *
 * SPDX-License-Identifier: EPL-2.0
 * 
 * Contributors:
 * Philip Wenig - initial API and implementation
 *******************************************************************************/
package org.eclipse.chemclipse.ux.extension.xxd.ui.toolbar;

import java.util.ArrayList;
import java.util.List;

import org.eclipse.chemclipse.rcp.ui.icons.core.IApplicationImage;
import org.eclipse.chemclipse.ux.extension.ui.support.PartSupport;
import org.eclipse.chemclipse.ux.extension.xxd.ui.preferences.PreferencePageTaskISTD;
import org.eclipse.chemclipse.ux.extension.xxd.ui.preferences.PreferenceSupplier;
import org.eclipse.jface.preference.IPreferencePage;

public class GroupHandlerISTD extends AbstractGroupHandler {

	public static final String NAME = "ISTD";

	private static final String IMAGE_HIDE = IApplicationImage.IMAGE_INTERNAL_STANDARDS_ACTIVE;
	private static final String IMAGE_SHOW = IApplicationImage.IMAGE_INTERNAL_STANDARDS_DEFAULT;

	@Override
	public List<IPreferencePage> getPreferencePages() {

		List<IPreferencePage> preferencePages = new ArrayList<>();
		preferencePages.add(new PreferencePageTaskISTD());
		return preferencePages;
	}

	@Override
	public List<IPartHandler> getPartHandlerMandatory() {

		List<IPartHandler> partHandler = new ArrayList<>();

		partHandler.add(new PartHandler("Internal Standards", PartSupport.PARTDESCRIPTOR_INTERNAL_STANDARDS, PreferenceSupplier.P_STACK_POSITION_INTERNAL_STANDARDS));
		partHandler.add(new PartHandler("Quantitation References", PartSupport.PARTDESCRIPTOR_PEAK_QUANTITATION_REFERENCES, PreferenceSupplier.P_STACK_POSITION_PEAK_QUANTITATION_REFERENCES));

		return partHandler;
	}

	@Override
	public List<IPartHandler> getPartHandlerAdditional() {

		List<IPartHandler> partHandler = new ArrayList<>();

		partHandler.add(new PartHandler("Quantitation", PartSupport.PARTDESCRIPTOR_QUANTITATION, PreferenceSupplier.P_STACK_POSITION_QUANTITATION));

		return partHandler;
	}

	@Override
	public String getName() {

		return NAME;
	}

	@Override
	public String getImageHide() {

		return IMAGE_HIDE;
	}

	@Override
	public String getImageShow() {

		return IMAGE_SHOW;
	}

	@Override
	public String getMainMenuSuffix() {

		return ".istd";
	}
}
